//
//  ViewController.m
//  XHNetwork
//
//  Created by xinph on 2020/3/11.
//  Copyright © 2020 xinph. All rights reserved.
//

#import "ViewController.h"
#import "XHHTTPService.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (RACSignal *)request
{
    ///1、配置参数模型
    XHURLParameters *paramter = [XHURLParameters urlParametersWithMethod:XH_HTTTP_METHOD_GET path:@"baijia/2020-03/12/1301042119.html" parameters:nil];
    ///2、发起请求
    return [[XHHTTPRequest requestWithParameters:paramter] enqueueResultClass:NSObject.class];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [[self request] subscribeNext:^(id  _Nullable x) {
        
    }];
}

@end
